package web;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.zhuozhengsoft.pageoffice.OpenModeType;
import com.zhuozhengsoft.pageoffice.PageOfficeCtrl;

@Controller
public class OpenWord extends HttpServlet{
	private static final long serialVersionUID = -758686623642845302L;
	@RequestMapping("openword")  
         public String openword(HttpServletRequest request, HttpServletResponse response){
		PageOfficeCtrl poCtrl=new PageOfficeCtrl(request);
		//设置服务页面
		poCtrl.setServerPage(request.getContextPath()+"/poserver.zz");
		//添加保存按钮
		poCtrl.addCustomToolButton("保存并关闭","Save",1);
		//设置保存的action
		poCtrl.setSaveFilePage("savefile.do");
		//打开word
		poCtrl.webOpen("doc/test.doc",OpenModeType.docAdmin,"张三");
		poCtrl.setTagId("PageOfficeCtrl1");
        return "Word";  
    } 
}
